<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/7/12
 * Time: 10:01
 */

namespace Mobile\Model;


use Think\Model;

class DataModel extends Model
{
    protected $trueTableName = 'vip_user';
    public function getData(){
        $data=array();
    $sql='select * from db_user';
    $data=$this->db(1,"mysql://root:root@localhost:3306/jichu")->query($sql);
    return $data;
}
    public function getAdmin(){
        $this->trueTableName = 'db_admin';
        $data=array();
        $sql='select * from db_admin';
        $data=$this->db(1)->query($sql);
        return $data;
    }
}